# Variables
JAVAC = javac
JAVAFLAGS = -d ./bin
SRC_DIR = ./com/elnguage/lox
TOOL_DIR = ./com/elnguage/tool
JAVA_SRCS = $(wildcard $(SRC_DIR)/*.java)
TOOL_SRCS = $(wildcard $(TOOL_DIR)/*.java)

# Targets
all: LOX

LOX: $(JAVA_SRCS)
	$(JAVAC) $(JAVAFLAGS) $(SRC_DIR)/*.java

clean:
	rm -f ./bin/com/elnguage/lox/*.class

tool: $(TOOL_SRCS)
	$(JAVAC) $(JAVAFLAGS) $(TOOL_DIR)/*.java

run: 
	java -cp ./bin/ com.elnguage.lox.Lox